﻿using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Records;
using System;
namespace CrewCalculator.Models
{
    public class CrewCalculatorPartRecord : ContentPartRecord
    {
        public virtual string UserName { get; set; }
        public virtual Species Species { get; set; }
        public virtual double ShipCrew { get; set; }
        public virtual double CurrentCrew { get; set; }
    }

    public class CrewCalculatorPart : ContentPart<CrewCalculatorPartRecord>
    {
     
        public string UserName
        {
            get { return Record.UserName ; }
            set { Record.UserName = value; }
        }    

        [Required]
        public Species Species
        {
            get { return Record.Species; }
            set { Record.Species = value; }
        }
        [Required]   
        public double ShipCrew
        {
            get { return Record.ShipCrew; }
            set { Record.ShipCrew = value; }
        }
        [Required]
        public double CurrentCrew
        {
            get { return Record.CurrentCrew; }
            set { Record.CurrentCrew = value; }
        }
    }
    public enum Species
    {
        Romulan,
        Klingon,
        Federation
    }

}